package com.starview.platform.data.value;

import java.math.BigDecimal;

import com.starview.platform.data.IScalar;

@SuppressWarnings("serial")
public abstract class NumberWrap<T> implements IScalar<T>
{
  public abstract int intValue();

  public abstract long longValue();

  public abstract double floatValue();

  public abstract BigDecimal bigNumValue();

  @Override
  public boolean equals(Object obj)
  {
    if (obj instanceof NumberWrap) {
      NumberWrap<?> other = (NumberWrap<?>) obj;
      return this.getValue().equals(other.getValue());
    }
    return false;
  }

  @Override
  public int hashCode()
  {
    return this.getValue().hashCode();
  }
}
